{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[36, 74, 69],\n",
       "        [89, 88, 85],\n",
       "        [33,  2, 25],\n",
       "        [12, 78, 88],\n",
       "        [56, 25, 91],\n",
       "        [58,  1, 72],\n",
       "        [65, 17, 13],\n",
       "        [50,  4, 91],\n",
       "        [10, 46, 40],\n",
       "        [58, 69, 53],\n",
       "        [82, 86, 18],\n",
       "        [ 0, 98, 49],\n",
       "        [34, 82, 37],\n",
       "        [38, 54, 58],\n",
       "        [86, 81, 74],\n",
       "        [77, 45, 57],\n",
       "        [94, 44, 93],\n",
       "        [43, 57, 42],\n",
       "        [89, 29, 79],\n",
       "        [28,  2, 78],\n",
       "        [53, 49, 94],\n",
       "        [18, 98, 67],\n",
       "        [78, 34,  8],\n",
       "        [79, 53, 39],\n",
       "        [88, 99, 67],\n",
       "        [99,  9, 23],\n",
       "        [35, 20, 51],\n",
       "        [59,  5, 10],\n",
       "        [23, 50, 31],\n",
       "        [92, 84, 42],\n",
       "        [ 5, 78, 58],\n",
       "        [42, 41, 11],\n",
       "        [78, 46, 37],\n",
       "        [42, 53, 98],\n",
       "        [32, 69,  8],\n",
       "        [ 9, 16, 35],\n",
       "        [65,  4, 96],\n",
       "        [49, 94, 82],\n",
       "        [86, 60, 63],\n",
       "        [ 6, 15, 92],\n",
       "        [76,  4, 80],\n",
       "        [63, 26, 56],\n",
       "        [72, 92, 76],\n",
       "        [ 3, 58, 33],\n",
       "        [46, 56, 57],\n",
       "        [ 1,  1, 17],\n",
       "        [46, 90, 23],\n",
       "        [15, 35, 12],\n",
       "        [16, 59, 64],\n",
       "        [17, 15, 90]],\n",
       "\n",
       "       [[46, 21, 56],\n",
       "        [22, 86,  8],\n",
       "        [68, 29,  9],\n",
       "        [79, 83, 37],\n",
       "        [ 3, 34, 15],\n",
       "        [24, 31, 76],\n",
       "        [91,  7, 29],\n",
       "        [93, 64, 69],\n",
       "        [17, 94, 85],\n",
       "        [46, 61, 20],\n",
       "        [43, 64,  9],\n",
       "        [49, 95, 90],\n",
       "        [48,  3, 84],\n",
       "        [25, 40, 56],\n",
       "        [27,  7, 61],\n",
       "        [51, 58, 44],\n",
       "        [56, 50, 45],\n",
       "        [ 0, 13, 17],\n",
       "        [46, 40, 29],\n",
       "        [70, 93, 23],\n",
       "        [56,  7, 63],\n",
       "        [29, 59, 38],\n",
       "        [38, 40, 49],\n",
       "        [19,  1, 89],\n",
       "        [47, 18,  6],\n",
       "        [61, 96, 68],\n",
       "        [58, 89, 41],\n",
       "        [82, 19, 54],\n",
       "        [77, 14, 87],\n",
       "        [56, 96, 51],\n",
       "        [48, 33, 63],\n",
       "        [50, 61, 63],\n",
       "        [ 4, 25,  8],\n",
       "        [74, 38, 77],\n",
       "        [45, 16, 75],\n",
       "        [84, 24, 45],\n",
       "        [78, 29,  8],\n",
       "        [ 1, 72, 44],\n",
       "        [ 4, 11, 59],\n",
       "        [50, 74, 99],\n",
       "        [90, 73, 45],\n",
       "        [22, 74, 29],\n",
       "        [36, 11, 62],\n",
       "        [ 2, 18, 53],\n",
       "        [82, 36, 71],\n",
       "        [ 0, 99, 78],\n",
       "        [78, 55, 45],\n",
       "        [42, 95, 82],\n",
       "        [77, 64, 77],\n",
       "        [32, 40, 72]],\n",
       "\n",
       "       [[39, 42, 19],\n",
       "        [79, 60, 38],\n",
       "        [49, 57, 29],\n",
       "        [53, 38, 43],\n",
       "        [35, 33, 67],\n",
       "        [77, 96, 50],\n",
       "        [48, 40, 44],\n",
       "        [30, 55,  1],\n",
       "        [88, 90, 85],\n",
       "        [75, 61, 11],\n",
       "        [65, 79, 99],\n",
       "        [75, 61, 96],\n",
       "        [24,  0, 82],\n",
       "        [32, 88, 16],\n",
       "        [22, 35, 41],\n",
       "        [13, 12,  9],\n",
       "        [95,  2, 25],\n",
       "        [76, 24, 77],\n",
       "        [88, 70, 63],\n",
       "        [58, 77, 94],\n",
       "        [73, 78, 48],\n",
       "        [88, 32, 42],\n",
       "        [68, 39, 61],\n",
       "        [96, 80, 28],\n",
       "        [84,  8, 82],\n",
       "        [61, 12, 42],\n",
       "        [76, 63, 72],\n",
       "        [86, 39, 67],\n",
       "        [57, 59, 84],\n",
       "        [34, 17, 91],\n",
       "        [10, 39, 94],\n",
       "        [75, 72, 71],\n",
       "        [34, 99, 38],\n",
       "        [ 2, 52, 13],\n",
       "        [15, 18, 60],\n",
       "        [60,  3, 59],\n",
       "        [58, 37, 41],\n",
       "        [59, 17, 91],\n",
       "        [14, 79, 68],\n",
       "        [75, 70, 51],\n",
       "        [47, 76, 51],\n",
       "        [33, 68,  2],\n",
       "        [85, 19, 67],\n",
       "        [80, 55, 86],\n",
       "        [67, 39, 94],\n",
       "        [54, 19, 13],\n",
       "        [97, 33, 75],\n",
       "        [58,  2,  1],\n",
       "        [32, 16, 17],\n",
       "        [75, 44,  9]],\n",
       "\n",
       "       [[96, 72, 13],\n",
       "        [61, 26, 55],\n",
       "        [57, 92, 49],\n",
       "        [88, 39, 69],\n",
       "        [17, 33, 18],\n",
       "        [64,  2, 58],\n",
       "        [92, 86, 72],\n",
       "        [38, 42, 68],\n",
       "        [63, 64, 65],\n",
       "        [96, 48, 90],\n",
       "        [88, 13, 86],\n",
       "        [94, 34, 18],\n",
       "        [33, 11, 52],\n",
       "        [ 1, 92, 70],\n",
       "        [14,  7, 15],\n",
       "        [15, 20, 59],\n",
       "        [71,  1, 49],\n",
       "        [34, 28, 92],\n",
       "        [97, 70, 97],\n",
       "        [20, 82,  2],\n",
       "        [73, 11, 53],\n",
       "        [41, 13, 54],\n",
       "        [42, 84,  6],\n",
       "        [42, 74, 15],\n",
       "        [77, 44,  3],\n",
       "        [62, 52, 32],\n",
       "        [78, 17, 19],\n",
       "        [ 4, 16, 99],\n",
       "        [18, 31, 20],\n",
       "        [19, 82,  9],\n",
       "        [ 5, 10, 79],\n",
       "        [41, 88, 91],\n",
       "        [11,  1, 62],\n",
       "        [ 3, 69, 94],\n",
       "        [ 7,  6, 63],\n",
       "        [91, 27, 47],\n",
       "        [47, 28, 79],\n",
       "        [73, 67, 74],\n",
       "        [37, 27, 68],\n",
       "        [22, 51, 10],\n",
       "        [50, 21, 78],\n",
       "        [92, 86, 80],\n",
       "        [ 5, 41, 23],\n",
       "        [89, 25, 49],\n",
       "        [67, 31, 12],\n",
       "        [23, 63,  1],\n",
       "        [54, 18, 30],\n",
       "        [92, 95, 49],\n",
       "        [16, 28, 94],\n",
       "        [91, 79, 44]],\n",
       "\n",
       "       [[39, 79, 74],\n",
       "        [50,  5, 59],\n",
       "        [19, 70, 76],\n",
       "        [76, 28, 98],\n",
       "        [13, 44, 28],\n",
       "        [31, 86, 63],\n",
       "        [42, 54, 48],\n",
       "        [47, 30, 39],\n",
       "        [50, 50, 16],\n",
       "        [54, 82, 59],\n",
       "        [64, 94, 33],\n",
       "        [30, 18, 15],\n",
       "        [ 1, 95, 56],\n",
       "        [44, 84, 30],\n",
       "        [11, 58, 71],\n",
       "        [82, 92, 55],\n",
       "        [33, 91, 97],\n",
       "        [88, 66, 77],\n",
       "        [17, 53, 77],\n",
       "        [40, 39, 87],\n",
       "        [84, 70, 26],\n",
       "        [85, 93,  2],\n",
       "        [17, 85, 65],\n",
       "        [13, 59, 45],\n",
       "        [99, 87, 69],\n",
       "        [76, 65,  4],\n",
       "        [97, 95, 46],\n",
       "        [72, 22, 68],\n",
       "        [91, 99, 80],\n",
       "        [20, 24, 58],\n",
       "        [88, 90, 56],\n",
       "        [45, 33, 88],\n",
       "        [ 9, 87, 57],\n",
       "        [31, 12,  9],\n",
       "        [33, 82, 17],\n",
       "        [22, 65, 57],\n",
       "        [38, 24, 45],\n",
       "        [11, 95, 69],\n",
       "        [42, 96, 61],\n",
       "        [12, 32, 59],\n",
       "        [ 0, 33, 45],\n",
       "        [55, 65, 64],\n",
       "        [20, 47, 19],\n",
       "        [81,  3, 11],\n",
       "        [39, 95, 62],\n",
       "        [12, 40, 44],\n",
       "        [26, 24,  1],\n",
       "        [17, 98,  6],\n",
       "        [79, 26, 90],\n",
       "        [55, 13, 41]],\n",
       "\n",
       "       [[96, 61, 96],\n",
       "        [86, 91, 49],\n",
       "        [30, 42,  0],\n",
       "        [66,  0, 59],\n",
       "        [86, 21, 31],\n",
       "        [77, 28, 64],\n",
       "        [41, 28, 62],\n",
       "        [68, 41, 96],\n",
       "        [17, 75, 29],\n",
       "        [28, 69,  3],\n",
       "        [26, 71, 76],\n",
       "        [71, 83, 54],\n",
       "        [29, 74, 19],\n",
       "        [ 2, 49, 54],\n",
       "        [51, 13, 55],\n",
       "        [61, 15, 55],\n",
       "        [ 1, 13, 60],\n",
       "        [44, 40, 54],\n",
       "        [53, 24, 81],\n",
       "        [62, 34, 27],\n",
       "        [70, 20, 39],\n",
       "        [10, 19, 29],\n",
       "        [25, 24, 35],\n",
       "        [57, 69, 92],\n",
       "        [73, 30, 49],\n",
       "        [36, 50, 63],\n",
       "        [57, 73,  4],\n",
       "        [ 3, 18, 61],\n",
       "        [86, 78, 98],\n",
       "        [90,  8, 13],\n",
       "        [92, 86, 32],\n",
       "        [73, 39, 73],\n",
       "        [47, 96, 20],\n",
       "        [99,  4, 26],\n",
       "        [64, 29, 91],\n",
       "        [66, 74, 82],\n",
       "        [52, 32, 85],\n",
       "        [15, 22, 74],\n",
       "        [47, 92, 76],\n",
       "        [43, 31, 34],\n",
       "        [69, 91, 95],\n",
       "        [15, 82, 68],\n",
       "        [76, 73, 98],\n",
       "        [49, 87, 89],\n",
       "        [16, 45, 82],\n",
       "        [ 4, 53,  8],\n",
       "        [33, 62, 46],\n",
       "        [ 4, 76, 71],\n",
       "        [81, 74, 24],\n",
       "        [38, 65, 40]]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "test = np.random.randint(0,100,size = (6,50,3))\n",
    "test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[36, 74, 69],\n",
       "       [89, 88, 85],\n",
       "       [33,  2, 25],\n",
       "       [12, 78, 88],\n",
       "       [56, 25, 91],\n",
       "       [58,  1, 72],\n",
       "       [65, 17, 13],\n",
       "       [50,  4, 91],\n",
       "       [10, 46, 40],\n",
       "       [58, 69, 53],\n",
       "       [82, 86, 18],\n",
       "       [ 0, 98, 49],\n",
       "       [34, 82, 37],\n",
       "       [38, 54, 58],\n",
       "       [86, 81, 74],\n",
       "       [77, 45, 57],\n",
       "       [94, 44, 93],\n",
       "       [43, 57, 42],\n",
       "       [89, 29, 79],\n",
       "       [28,  2, 78],\n",
       "       [53, 49, 94],\n",
       "       [18, 98, 67],\n",
       "       [78, 34,  8],\n",
       "       [79, 53, 39],\n",
       "       [88, 99, 67],\n",
       "       [99,  9, 23],\n",
       "       [35, 20, 51],\n",
       "       [59,  5, 10],\n",
       "       [23, 50, 31],\n",
       "       [92, 84, 42],\n",
       "       [ 5, 78, 58],\n",
       "       [42, 41, 11],\n",
       "       [78, 46, 37],\n",
       "       [42, 53, 98],\n",
       "       [32, 69,  8],\n",
       "       [ 9, 16, 35],\n",
       "       [65,  4, 96],\n",
       "       [49, 94, 82],\n",
       "       [86, 60, 63],\n",
       "       [ 6, 15, 92],\n",
       "       [76,  4, 80],\n",
       "       [63, 26, 56],\n",
       "       [72, 92, 76],\n",
       "       [ 3, 58, 33],\n",
       "       [46, 56, 57],\n",
       "       [ 1,  1, 17],\n",
       "       [46, 90, 23],\n",
       "       [15, 35, 12],\n",
       "       [16, 59, 64],\n",
       "       [17, 15, 90],\n",
       "       [46, 21, 56],\n",
       "       [22, 86,  8],\n",
       "       [68, 29,  9],\n",
       "       [79, 83, 37],\n",
       "       [ 3, 34, 15],\n",
       "       [24, 31, 76],\n",
       "       [91,  7, 29],\n",
       "       [93, 64, 69],\n",
       "       [17, 94, 85],\n",
       "       [46, 61, 20],\n",
       "       [43, 64,  9],\n",
       "       [49, 95, 90],\n",
       "       [48,  3, 84],\n",
       "       [25, 40, 56],\n",
       "       [27,  7, 61],\n",
       "       [51, 58, 44],\n",
       "       [56, 50, 45],\n",
       "       [ 0, 13, 17],\n",
       "       [46, 40, 29],\n",
       "       [70, 93, 23],\n",
       "       [56,  7, 63],\n",
       "       [29, 59, 38],\n",
       "       [38, 40, 49],\n",
       "       [19,  1, 89],\n",
       "       [47, 18,  6],\n",
       "       [61, 96, 68],\n",
       "       [58, 89, 41],\n",
       "       [82, 19, 54],\n",
       "       [77, 14, 87],\n",
       "       [56, 96, 51],\n",
       "       [48, 33, 63],\n",
       "       [50, 61, 63],\n",
       "       [ 4, 25,  8],\n",
       "       [74, 38, 77],\n",
       "       [45, 16, 75],\n",
       "       [84, 24, 45],\n",
       "       [78, 29,  8],\n",
       "       [ 1, 72, 44],\n",
       "       [ 4, 11, 59],\n",
       "       [50, 74, 99],\n",
       "       [90, 73, 45],\n",
       "       [22, 74, 29],\n",
       "       [36, 11, 62],\n",
       "       [ 2, 18, 53],\n",
       "       [82, 36, 71],\n",
       "       [ 0, 99, 78],\n",
       "       [78, 55, 45],\n",
       "       [42, 95, 82],\n",
       "       [77, 64, 77],\n",
       "       [32, 40, 72],\n",
       "       [39, 42, 19],\n",
       "       [79, 60, 38],\n",
       "       [49, 57, 29],\n",
       "       [53, 38, 43],\n",
       "       [35, 33, 67],\n",
       "       [77, 96, 50],\n",
       "       [48, 40, 44],\n",
       "       [30, 55,  1],\n",
       "       [88, 90, 85],\n",
       "       [75, 61, 11],\n",
       "       [65, 79, 99],\n",
       "       [75, 61, 96],\n",
       "       [24,  0, 82],\n",
       "       [32, 88, 16],\n",
       "       [22, 35, 41],\n",
       "       [13, 12,  9],\n",
       "       [95,  2, 25],\n",
       "       [76, 24, 77],\n",
       "       [88, 70, 63],\n",
       "       [58, 77, 94],\n",
       "       [73, 78, 48],\n",
       "       [88, 32, 42],\n",
       "       [68, 39, 61],\n",
       "       [96, 80, 28],\n",
       "       [84,  8, 82],\n",
       "       [61, 12, 42],\n",
       "       [76, 63, 72],\n",
       "       [86, 39, 67],\n",
       "       [57, 59, 84],\n",
       "       [34, 17, 91],\n",
       "       [10, 39, 94],\n",
       "       [75, 72, 71],\n",
       "       [34, 99, 38],\n",
       "       [ 2, 52, 13],\n",
       "       [15, 18, 60],\n",
       "       [60,  3, 59],\n",
       "       [58, 37, 41],\n",
       "       [59, 17, 91],\n",
       "       [14, 79, 68],\n",
       "       [75, 70, 51],\n",
       "       [47, 76, 51],\n",
       "       [33, 68,  2],\n",
       "       [85, 19, 67],\n",
       "       [80, 55, 86],\n",
       "       [67, 39, 94],\n",
       "       [54, 19, 13],\n",
       "       [97, 33, 75],\n",
       "       [58,  2,  1],\n",
       "       [32, 16, 17],\n",
       "       [75, 44,  9],\n",
       "       [96, 72, 13],\n",
       "       [61, 26, 55],\n",
       "       [57, 92, 49],\n",
       "       [88, 39, 69],\n",
       "       [17, 33, 18],\n",
       "       [64,  2, 58],\n",
       "       [92, 86, 72],\n",
       "       [38, 42, 68],\n",
       "       [63, 64, 65],\n",
       "       [96, 48, 90],\n",
       "       [88, 13, 86],\n",
       "       [94, 34, 18],\n",
       "       [33, 11, 52],\n",
       "       [ 1, 92, 70],\n",
       "       [14,  7, 15],\n",
       "       [15, 20, 59],\n",
       "       [71,  1, 49],\n",
       "       [34, 28, 92],\n",
       "       [97, 70, 97],\n",
       "       [20, 82,  2],\n",
       "       [73, 11, 53],\n",
       "       [41, 13, 54],\n",
       "       [42, 84,  6],\n",
       "       [42, 74, 15],\n",
       "       [77, 44,  3],\n",
       "       [62, 52, 32],\n",
       "       [78, 17, 19],\n",
       "       [ 4, 16, 99],\n",
       "       [18, 31, 20],\n",
       "       [19, 82,  9],\n",
       "       [ 5, 10, 79],\n",
       "       [41, 88, 91],\n",
       "       [11,  1, 62],\n",
       "       [ 3, 69, 94],\n",
       "       [ 7,  6, 63],\n",
       "       [91, 27, 47],\n",
       "       [47, 28, 79],\n",
       "       [73, 67, 74],\n",
       "       [37, 27, 68],\n",
       "       [22, 51, 10],\n",
       "       [50, 21, 78],\n",
       "       [92, 86, 80],\n",
       "       [ 5, 41, 23],\n",
       "       [89, 25, 49],\n",
       "       [67, 31, 12],\n",
       "       [23, 63,  1],\n",
       "       [54, 18, 30],\n",
       "       [92, 95, 49],\n",
       "       [16, 28, 94],\n",
       "       [91, 79, 44],\n",
       "       [39, 79, 74],\n",
       "       [50,  5, 59],\n",
       "       [19, 70, 76],\n",
       "       [76, 28, 98],\n",
       "       [13, 44, 28],\n",
       "       [31, 86, 63],\n",
       "       [42, 54, 48],\n",
       "       [47, 30, 39],\n",
       "       [50, 50, 16],\n",
       "       [54, 82, 59],\n",
       "       [64, 94, 33],\n",
       "       [30, 18, 15],\n",
       "       [ 1, 95, 56],\n",
       "       [44, 84, 30],\n",
       "       [11, 58, 71],\n",
       "       [82, 92, 55],\n",
       "       [33, 91, 97],\n",
       "       [88, 66, 77],\n",
       "       [17, 53, 77],\n",
       "       [40, 39, 87],\n",
       "       [84, 70, 26],\n",
       "       [85, 93,  2],\n",
       "       [17, 85, 65],\n",
       "       [13, 59, 45],\n",
       "       [99, 87, 69],\n",
       "       [76, 65,  4],\n",
       "       [97, 95, 46],\n",
       "       [72, 22, 68],\n",
       "       [91, 99, 80],\n",
       "       [20, 24, 58],\n",
       "       [88, 90, 56],\n",
       "       [45, 33, 88],\n",
       "       [ 9, 87, 57],\n",
       "       [31, 12,  9],\n",
       "       [33, 82, 17],\n",
       "       [22, 65, 57],\n",
       "       [38, 24, 45],\n",
       "       [11, 95, 69],\n",
       "       [42, 96, 61],\n",
       "       [12, 32, 59],\n",
       "       [ 0, 33, 45],\n",
       "       [55, 65, 64],\n",
       "       [20, 47, 19],\n",
       "       [81,  3, 11],\n",
       "       [39, 95, 62],\n",
       "       [12, 40, 44],\n",
       "       [26, 24,  1],\n",
       "       [17, 98,  6],\n",
       "       [79, 26, 90],\n",
       "       [55, 13, 41],\n",
       "       [96, 61, 96],\n",
       "       [86, 91, 49],\n",
       "       [30, 42,  0],\n",
       "       [66,  0, 59],\n",
       "       [86, 21, 31],\n",
       "       [77, 28, 64],\n",
       "       [41, 28, 62],\n",
       "       [68, 41, 96],\n",
       "       [17, 75, 29],\n",
       "       [28, 69,  3],\n",
       "       [26, 71, 76],\n",
       "       [71, 83, 54],\n",
       "       [29, 74, 19],\n",
       "       [ 2, 49, 54],\n",
       "       [51, 13, 55],\n",
       "       [61, 15, 55],\n",
       "       [ 1, 13, 60],\n",
       "       [44, 40, 54],\n",
       "       [53, 24, 81],\n",
       "       [62, 34, 27],\n",
       "       [70, 20, 39],\n",
       "       [10, 19, 29],\n",
       "       [25, 24, 35],\n",
       "       [57, 69, 92],\n",
       "       [73, 30, 49],\n",
       "       [36, 50, 63],\n",
       "       [57, 73,  4],\n",
       "       [ 3, 18, 61],\n",
       "       [86, 78, 98],\n",
       "       [90,  8, 13],\n",
       "       [92, 86, 32],\n",
       "       [73, 39, 73],\n",
       "       [47, 96, 20],\n",
       "       [99,  4, 26],\n",
       "       [64, 29, 91],\n",
       "       [66, 74, 82],\n",
       "       [52, 32, 85],\n",
       "       [15, 22, 74],\n",
       "       [47, 92, 76],\n",
       "       [43, 31, 34],\n",
       "       [69, 91, 95],\n",
       "       [15, 82, 68],\n",
       "       [76, 73, 98],\n",
       "       [49, 87, 89],\n",
       "       [16, 45, 82],\n",
       "       [ 4, 53,  8],\n",
       "       [33, 62, 46],\n",
       "       [ 4, 76, 71],\n",
       "       [81, 74, 24],\n",
       "       [38, 65, 40]])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score = np.concatenate(test,axis = 0)\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0]])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#1为男 0为女\n",
    "sex = np.random.randint(0,2,size = (300,1))\n",
    "sex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[36, 74, 69,  0],\n",
       "       [89, 88, 85,  1],\n",
       "       [33,  2, 25,  1],\n",
       "       ...,\n",
       "       [ 4, 76, 71,  0],\n",
       "       [81, 74, 24,  1],\n",
       "       [38, 65, 40,  0]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.hstack((score,sex))\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 1, 1])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([99, 98, 99,  1])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([49.82394366, 47.75352113, 52.9084507 ,  1.        ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([50. , 40.5, 55. ,  1. ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([28.65784048, 30.25343343, 25.00109996,  0.        ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 男生各科成绩统计指标\n",
    "cond = data[:,3] == 1 # 男生\n",
    "score_min = data[cond].min(axis = 0)\n",
    "score_max = data[cond].max(axis = 0)\n",
    "score_mean = data[cond].mean(axis = 0)\n",
    "score_median = np.median(data[cond],axis = 0)\n",
    "score_std = data[cond].std(axis = 0)\n",
    "display(score_min,score_max,score_mean,score_median,score_std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 0, 0])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([99, 99, 99,  0])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([49.06329114, 49.84810127, 51.6835443 ,  0.        ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([47. , 49. , 55.5,  0. ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([28.36843574, 29.01945598, 30.16181856,  0.        ])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 女生各科成绩指标\n",
    "cond = data[:,3] == 0 # 女生\n",
    "score_min = data[cond].min(axis = 0)\n",
    "score_max = data[cond].max(axis = 0)\n",
    "score_mean = data[cond].mean(axis = 0)\n",
    "score_median = np.median(data[cond],axis = 0)\n",
    "score_std = data[cond].std(axis = 0)\n",
    "display(score_min,score_max,score_mean,score_median,score_std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
